

package ca.kooki.codesnippet.views;

import junit.framework.Assert;

import org.junit.Before;
import org.junit.Test;

import ca.kooki.codesnippet.CodeSnippet;
import ca.kooki.codesnippet.Tag;

public class TagEntryViewTest extends SwtTest {

  private TagEntryView entryView;
  
  @Before
  public void setUp() throws Exception {
    super.setUp();
    entryView = new TagEntryView();
  }
  
  @Test
  public void LayoutNames()
  {
    entryView.initLayout(parent);
    Assert.assertEquals("Title",entryView.labelTitle.getText());
    Assert.assertEquals("Keywords",entryView.labelKeywords.getText());
    Assert.assertEquals("Code",entryView.labelCode.getText());
    Assert.assertEquals("Add", entryView.buttonAdd.getText());
  } 
  
  @Test
  public void HandlerSetUp()
  {
    Tag tag = new Tag("t","k",new CodeSnippet("t","k","code"),"aforward");
    
    entryView.initLayout(parent);
    entryView.tagExistingCodeSnippet(tag);
    entryView.updateTag(tag);
  }

  
  
}
